]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
run-js-test: GC twice after running a test
authorJasper St. Pierre <jstpierre@mecheye.net>
Sun, 24 Jun 2012 06:25:38 +0000 (02:25 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sun, 24 Jun 2012 23:20:48 +0000 (19:20 -0400)
When running with Valgrind, this helps us ensure that we're managing
memory correctly. We need to GC twice as finalizing an object in the
sweep can unroot objects which were already marked. Technically, it
could be that we'll need to GC more than twice, but GCing twice should
hopefully last us for now.

https://bugzilla.gnome.org/show_bug.cgi?id=678737

src/run-js-test.c

index 1fefe292f43b26868bf05694b10161e8dec94051..894e2b67ac060606d9cd477fa7182da697bc52e1 100644 (file)
@@ -144,6 +144,9 @@ main(int argc, char **argv)
     exit (1);
   }
 
+  gjs_context_gc (js_context);
+  gjs_context_gc (js_context);
+
   g_free (script);
   exit (code);
 }